{% extends "base_generic.html" %}
{% block content %}
  <h1>Links ({{links|length}})</h1>
  <h2><a href="/admin/links//new/" class="add">Add new Link</a></h2>
  <table class="tablelist">
  {% for link in links %}
    <tr>
      <td><img src="/image/{{link.imagekey}}/50/50/cropped/" width="20" /></td>
      <td>{{link.name}} ({{link.difficulty}}) ({{link.activity}})</td>
      <td>{% ifequal link.linktype 'category' %}{{link.category.name}}{% endifequal %}{% ifequal link.linktype 'unit' %}{{link.unit.name}}{% endifequal %}</td>
      <td><a href="/admin/links/{{link.key}}/edit/">Edit</a></td>
      <td><a href="/admin/links/{{link.key}}/delete/" onclick="return confirm('are you sure do you want to delete \'{{link.name}}\'?');">Delete</a></td>
      <td><a href="/{{link.url}}/">Public</a></td>
    </tr>
{%endfor%}
</table>
{% endblock %}
